/**
 * Created by Administrator on 2016/4/11.
 */
$(document).ready(function(){
    $("#loginButton").click(function(){
        //noinspection JSJQueryEfficiency
        if ("" == $("#account").val() || $("#account").val() == undefined) {
            alert('账号不能为空！');
            return false;
        }
        //noinspection JSJQueryEfficiency
        $("#account").blur(function(){
            alert($("#account").val());
            $.ajax({
                url: "/user/customer/login",
                type:'post',
                data:$('#loginForm').serialize(),
                success:function(data){
                    $("#area").html(data);
                }
            });
        });
        //noinspection JSJQueryEfficiency
        if("" == $("#password").val() || $("#password").val() == undefined){
            alert('密码不能为空');
            return false;
        }
        $.ajax({
            url: "/user/customer/login",
            type:'post',
            data:$('#loginForm').serialize(),
            success:function(data){
                $("#area").html(data);
            }
        });
    });
});